package tools.utils {
	/**
 * @author ase7en
 */
	public class BooleanUtil {
		public static function boolean(value:Object):Boolean {
			if (value is Boolean){
				return value as Boolean;
			}
			
			if(value is String){
				if(value == "0"||value == "false"){
					return false;
				}else if(value == "1"||value == "true"){
					return true;
				}
			}
			
			if (value is Number) {
				return Boolean(value);
			}
			return false;
		}
	}
}
